package practice02;

import java.util.Scanner;

/**
 * @author Administrator
 * @version V1.0
 * @ProjectName:IntelliJ IDEA
 * @PackageName: practice02
 * @ClassName: UserV
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @date 2019/12/12 20:08
 * @Copyright 大牛版板所有
 */
public class UserV implements IUserView {
    IUserBiz iUserBiz =new UserB();
    Scanner input =new Scanner(System.in);


    @Override
    public void register()throws IllegalRegisterException{
        System.out.println("请输入用户：");
        String username = input.next();
        System.out.println("请输入密码：");
        String password = input.next();
        System.out.println("请输入密码：");
        String repassword = input.next();
        System.out.println("请输入真实姓名：");
        String name = input.next();
        System.out.println("请输入邮箱：");
        String email = input.next();
        iUserBiz.register(username,password,repassword,name,email);
    }

    @Override
    public void login() throws IllegalLoginException{
        System.out.println("请输入用户名：");
        String username = input.next();
        System.out.println("请输入密码：");
        String password = input.next();
        iUserBiz.login(username,password);
    }
}
